<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script src="https://unpkg.com/mockjs"></script>
    <script src="https://unpkg.com/jquery"></script>
    <script>
        Mock.Random.natural()
        Mock.Random.image()
        Mock.Random.now()
        Mock.mock('/user','get',{
            "hello":'32323',
            "number|+1": 202,
            "number2|1-100": 100,
            "nested": {
                "a": {
                "b": {
                    "c": "Mock.js"
                }
                }
            },
            "nowtime":"@now",
            "natural":"@natural(10000)",
            "absolutePath": "@/hello @/nested/a/b/c",
            'img':"@image('200x100')"
        })
        $.get('/user',function(res){
                console.log(res)
                console.log(typeof(res))
                console.log(JSON.stringify(res))
                console.log(JSON.parse(res))
                console.log(JSON.parse(res).hello)
            }
        )
    </script>
</body>
</html>